package com.sparrow.example_message.backpack.resp;

import java.io.Serializable;

import com.baidu.bjf.remoting.protobuf.*;

import com.sparrow.example_message.backpack.resp.RespBackPackRemoveItem;

import java.util.*;

import com.baidu.bjf.remoting.protobuf.FieldType;

import com.baidu.bjf.remoting.protobuf.utils.*;

import com.google.protobuf.*;

import java.io.IOException;

import java.lang.reflect.*;

import com.baidu.bjf.remoting.protobuf.code.*;


public class RespBackPackRemoveItem$$JProtoBufClass implements com.baidu.bjf.remoting.protobuf.Codec<com.sparrow.example_message.backpack.resp.RespBackPackRemoveItem>, Serializable {
	public static final long serialVersionUID = 1L;
    private com.google.protobuf.Descriptors.Descriptor descriptor;

    public byte[] encode(com.sparrow.example_message.backpack.resp.RespBackPackRemoveItem t) throws IOException {
        CodecOutputByteArray output = CodecOutputByteArray.get();
        doWriteTo(t, output.getCodedOutputStream());
        return output.getData();
    }

    public com.sparrow.example_message.backpack.resp.RespBackPackRemoveItem decode(byte[] bb) throws IOException {
        CodedInputStream input = CodedInputStream.newInstance(bb, 0, bb.length);
        return readFrom(input);
    }

    public int size(com.sparrow.example_message.backpack.resp.RespBackPackRemoveItem t) throws IOException {
        int size = 0;
        
        Collection f_1 = null;
        if (!CodedConstant.isNull(t.getList())) {
            f_1 = t.getList();  
            size += CodedConstant.computeListSize(1, f_1, com.baidu.bjf.remoting.protobuf.FieldType.INT64, false, null,true);

        }
        
        
        return size;
    }
 
    public void doWriteTo(com.sparrow.example_message.backpack.resp.RespBackPackRemoveItem t, CodedOutputStream output)
            throws IOException {
         
        Collection f_1 = null;
        if (!CodedConstant.isNull(t.getList())) {
            f_1 = t.getList();
            if (f_1 != null){
CodedConstant.writeToList(output,1,com.baidu.bjf.remoting.protobuf.FieldType.INT64,f_1,true);
}
  
        }
        
    }            
 
    public void writeTo(com.sparrow.example_message.backpack.resp.RespBackPackRemoveItem t, CodedOutputStream output)
            throws IOException {
        doWriteTo(t, output);
    }
 
    public com.sparrow.example_message.backpack.resp.RespBackPackRemoveItem readFrom(CodedInputStream input) throws IOException {
        com.sparrow.example_message.backpack.resp.RespBackPackRemoveItem ret = new com.sparrow.example_message.backpack.resp.RespBackPackRemoveItem();
        
        ret.setList(new ArrayList())
;


        
        try {
            boolean done = false;
            Codec codec = null;
            while (!done) {
                int tag = input.readTag();
                if (tag == 0) {
                    break;
                }
                
                if (tag == 8) {
                    
                    if ((ret.getList()) == null) {
List __list = new ArrayList();
ret.setList(__list);
}
(ret.getList()).add(input.readInt64());

                    
                    
                    continue;
                }
                if (tag == 10) {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if ((ret.getList()) == null) {
List __list = new ArrayList();
ret.setList(__list);
}
while (input.getBytesUntilLimit() > 0) {
(ret.getList()).add(input.readInt64());}
input.popLimit(limit);
continue;
}

                               
                
                input.skipField(tag);
            }
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e;
        } catch (java.io.IOException e) {
            throw e;
        }

        return ret;       
        
    } 
 
 
     public com.google.protobuf.Descriptors.Descriptor getDescriptor() throws IOException {
        if (this.descriptor != null) {
            return this.descriptor;
        }
        com.google.protobuf.Descriptors.Descriptor descriptor =
                CodedConstant.getDescriptor(com.sparrow.example_message.backpack.resp.RespBackPackRemoveItem.class);
        return (this.descriptor = descriptor);
    }   
}

    